$('#sign-login').click(function(){
    var user_name = $('#user_name').val();
    var password = $('#password').val();
    var url_ref = $('#url_ref').val();

    if (user_name == '') {
        layer.alert('用户名/手机号不能为空');
        return false;
    }

    if (password == '') {
        layer.alert('密码不能为空');
        return false;
    }

    $.post(
        web_url+'/member/sign/loginopt.html',
        {'username':user_name, 'password':password},
        function (msg) {
            if (msg.code == 200)
                if (url_ref) location.href=url_ref;
                else location.href=web_url+'/member/default.html';
            else {
                layer.alert('用户名或者密码错误');
            }
        },'json'
    );
});

//微信登录
$(".btn-weixin").on("click",function()
{
    $(".boxMask,.boxMod").show();
});

$(".boxMask").on("click",function()
{
    $(".boxMask,.boxMod").hide();
})